//
//  TodayHotModel.m
//  EveryDayNews
//
//  Created by 徐继垚 on 14/11/28.
//  Copyright (c) 2014年 徐继垚. All rights reserved.
//

#import "TodayHotModel.h"

@implementation TodayHotModel
+(void)getDataWithBlock:(myblock)block
{
    NSMutableArray * array = [NSMutableArray array];
    [AFHTTPNetGetData connectNetGetDataWithURLString:@"http://news-at.zhihu.com/api/3/stories/latest?client=0" parameters:nil block:^(id result) {
        for (NSDictionary * dic in [result objectForKey:@"stories"]) {
            TodayHotModel * model = [[TodayHotModel alloc]init];
            model.tittle = [dic objectForKey:@"title"];
            model.myid = [dic objectForKey:@"id"];
            NSArray * arr = [dic objectForKey:@"images"];
            model.aimage = [arr objectAtIndex:0];
            [array addObject:model];
            
        }
        block(array);

    }];
  
}
@end
